/**
 * 
 */
package com.cp16.tss.bo;

import java.util.List;

import com.cp16.tss.dao.RequirementDAO;
import com.cp16.tss.dto.Requirement;
import com.cp16.tss.form.RequirementForm;

/**
 * @author ADMIN
 *
 */
public class RequirementBO {
	public RequirementDAO requirementDAO = new RequirementDAO();
	
	public Requirement getRequirementById(int requirementId) throws Exception{
		return requirementDAO.getRequirementById(requirementId);
	}
	
	public List<Requirement> getAllRequirement() throws Exception{
		return requirementDAO.getAllRequirement();
	}
	
	public List<Requirement> getRequirementByCustomerId(int customerId){
		return requirementDAO.getRequirementByCustomerId(customerId);
	}
	
	public boolean addNewRequirement(Requirement requirement){
		return requirementDAO.addNewRequirement(requirement);
	}
	
	public List<Requirement> searchRequirements(RequirementForm requirementForm){
		return requirementDAO.searchRequirements(requirementForm);
	}
	
	public boolean deleteRequirement(Requirement requirement) throws Exception {
		return requirementDAO.deleteRequirement(requirement);
	}
}
